#!/usr/bin/node

const log = console.log,
      usr = process.argv[2],
      pwd = process.argv[3]; 
if(process.argv.length !== 4) {
  console.error('命令行格式为node ...js username password');
  process.exit(1);
}
//输入 node 02- cmt 1234

//输出cmt 1234
log(usr);
log(pwd);
//编码
const buf = new Buffer(usr+':'+pwd);
log(buf.toString('Base64'));
